#include <ArduinoJson.h>


void setup() {
  // put your setup code here, to run once:

Serial.begin(9600);

  const char* input = "{\"id\":123,\"name\":\"thh\"}";

  StaticJsonDocument<256> doc;

  DeserializationError err = deserializeJson(doc, input);

  if (err) {

    Serial.print("Error:");
    Serial.print(err.c_str());
    return;
  }

  int id = doc["id"];
  Serial.println(id);

}

void loop() {
  // put your main code here, to run repeatedly:

}
